<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<head>
    <link rel="stylesheet" type="text/css" href="/css/style_member.css" />
    <title>会员注册-笔飞美术作品</title>
    <%@include file="../common/jspcommon.jsp"%>
	<%@include file="../common/css.jsp"%>
	<%@include file="../common/js.jsp"%>
</head>
<body>
<div id="box">
    <%@include file="../common/header.jsp"%>
    <div id="main_div">
        <div class="site_map"><a href="/member.htm">首页</a>  》<a href="mOrders.htm">我的订单</a>》<a href="mOrders.htm">选择收货地址</a></div>
        
        <div id="member_div_2">
            <table cellpadding="0" cellspacing="0" class="member_table">
                <tr>
                    <td class="td_1" valign="top">
                        <div class="left_nav">
	                      	<ul>
	                            <li><a href="/member.htm">控制面板</a></li>
	                            <li><a href="/memberInfo.htm">个人资料</a></li>
	                            <li	class="cur"><a href="/mOrders.htm">我的订单</a></li>
	                            <li><a href="/mMade.htm">我的定制</a></li>
	                            <li ><a href="/mActivity.htm">我的活动</a></li>
	                            <li><a href="/mHas.htm">关注收藏欣赏</a></li>
	                            <li><a href="mComment.htm">评论管理</a></li>
	                            <li><a href="mPay.htm">支付保证金</a></li>
	                        </ul>
                        </div>
                    </td>
                    <td class="td_2" valign="top">
                        <div class="mt20">
                            <table cellpadding="3" cellspacing="1" class="member_table2">
                                <tr>
                                    <td colspan="9" class="td_header td1">选择收货地址</td>
                                </tr>
                                <tr class="td2">
                                    <td style="width:80px; font-weight:bold;">图片</td>
                                    <td style="width:80px; font-weight:bold;">名称</td>
                                    <td style="width:80px; font-weight:bold;">起拍价</td>
                                    <td style="width:80px; font-weight:bold;">一口价</td>
                                    <td style="width:80px; font-weight:bold;">成交价</td>
                                    <td style="width:80px; font-weight:bold;">订单状态</td>
                                    <td style="width:80px; font-weight:bold;">订单编号</td>
                                    <td style="width:80px; font-weight:bold;">订单时间</td>
                                    <td>&nbsp;</td>
                                </tr>
	                                <tr class="td1">
	                                    <td><a href="#"><img src="${myOrders.artPic.imagePath}_100x100" class="img1" alt=""/></a></td>
	                                    <td>${myOrders.artPic.title}</td>
	                                    <td>${myOrders.artPic.price}</td>
	                                    <td>${myOrders.artPic.priceMax}</td>
	                                    <td>${myOrders.sucPrice}</td>
	                                    <td> <c:if test="${myOrders.status eq '01'}">成功<br /></c:if> </td>
	                                    <td>${myOrders.id}</td>
	                                    <td><fmt:formatDate value="${myOrders.gmtCreated}" pattern="yyyy-MM-dd HH:mm:SS" /></td>
	                                    <td><a href="#" onclick="showOrders('${myOrders.id}');"><img src="../images/btn_ddxq.jpg" alt=""/></a></td>
	                                </tr>
	                                <c:if test="${!empty addressList }">
	                                	<c:forEach items="${addressList}" var="list" varStatus="vs">
		                                	<tr>
		                                    	<td colspan="9" class="td_headeradd td1">
		                                    	<input id="payFrom${vs.count }" type="radio" name="payFrom" value="${list.id}" />&nbsp;&nbsp;&nbsp;
												<label for="payFrom${vs.count }">
												${list.province}${list.city}${list.county}${list.address}(${list.addressName})收${list.phone}
												</label>
		                             			</td>
		                               		 </tr>	
	                               		 </c:forEach>
                                	</c:if>
                                		 <c:if test="${empty addressList }">
                                	 				<tr>
		                                    		<td colspan="9" class="td_headeradd td1"><a href="/mAddress.htm">点我添加地址</a>
		                                    		</td>
		                               		 </tr>	
                                	      	</c:if>
                               		 	<tr class="td2">
                               				 <td colspan="9" class=""><input type="button" value="确认地址继续支付" style="height: 30px ;width: 120px" onclick="alipayto('${myOrders.id}');"/></td>
                               		 	</tr>
                            </table>
                        </div>
                        
                    </td>
                </tr>
            </table>
        </div>
        <%@include file="../common/footer.jsp" %>
    </div>
</div>
<script type="text/javascript">
function alipayto(oId){
	var addId=$("input[name='payFrom']:checked").val();
	if(addId !=null){
		//alert(1111);
		$.post("addOrderAddress.htm", {
			addId:addId,
			oId:oId
		},function(data){
			if(data=="success"){
				//alert("121");
				//var url = "/alipayto.htm";
				var url = "alipayto.htm?orderNum=${myOrders.id}";
				window.open(url);
			}
			if(data=="error"){
				alert("添加地址出错了。");
			}
		});
	}else{
		alert("地址出错了~");
	}
}
function showOrders(orderId){
	window.location.href="/orders.htm?oId="+orderId;
}
</script>
</body>
</html>
